import { createStore } from "vuex";
import cat from "./cat";

const store = createStore({
  state() {
    return {
      msg: "",
      sum: 0,
    };
  },
  getters: {
    testRoot(state, gettes, rootState, rootGetttes) {
      return JSON.stringify(state.myCat.counts);
      // console.log("🚀 ~ file: index.ts:12 ~ testRoot ~ arg", arg);
    },
  },
  mutations: {
    setSumByChild(state) {
      
    },
  },
  actions: {
    testAction({commit, dispatch}) {

    }
  },
  modules: {
    myCat: cat,
  },
});

export default store;
